#pragma once

#include <irrlicht.h>
#include <NxPhysics.h>
#include <iostream>
#include <string>

using namespace irr;
using namespace core;
using namespace scene;

class GameObject : public IReferenceCounted
{
public:
	GameObject(void);

	~GameObject(void);

	//apenas converte vec's da irrlicht para physx e vice-versa
	NxVec3 Vector3ToNXVec(vector3df vec);
	vector3df NXVecToVector3(NxVec3 vec);

	void setGeometry(IAnimatedMeshSceneNode *nodeGeometry);
	void setPhysics(NxActor *Actor);

	void step();

	IAnimatedMeshSceneNode *getNode(){return node;};
	NxActor *getActor(){return nodeActor;};

	void AplicarForca(NxVec3 forceDir, NxReal forceStrength);

	void Rotaciona(NxQuat q);
	void Rotaciona(NxVec3 eixo, float angulo);

	std::string GetType();

protected:

	//descritores de geometria(irrlicht) e fisica(physx)
	IAnimatedMeshSceneNode *node;
	NxActor *nodeActor;
	std::string tipoObj;
};

